package com.gupaoedu.mybatis.mywant;

public class MySqlSession {
    private static Executor executor; //执行
    private static Configaration configaration; //

    public MySqlSession(Executor executor, Configaration configaration) {
    this.executor =executor;
    this.configaration = configaration;
    }

    public    <T> T selectOne(String sql, String param){
        return executor.query(sql,param);
    }

    public   <T> T getMapper( Class<T> c){
       return (T) configaration.getMapper(c,this);
    }
}
